#include "graph.h"
int main()
{
    Graph *graph=new Graph(9);
    graph->addEdge(0,1);
    graph->addEdge(0,2);
    graph->addEdge(1,2);
    graph->addEdge(1,3);
    graph->addEdge(4,3);
    graph->addEdge(3,6);
    graph->addEdge(4,5);
    graph->addEdge(5,6);
    graph->addEdge(7,2);
    graph->printMap();
    graph->DFS();
    graph->printTopo();
    delete graph;
    Graph *graph2=new Graph(8);
    graph2->addEdge(0,1);
    graph2->addEdge(1,4);
    graph2->addEdge(4,0);
    graph2->addEdge(5,6);
    graph2->addEdge(6,5);
    graph2->addEdge(2,6);
    graph2->addEdge(6,7);
    graph2->addEdge(7,7);
    graph2->addEdge(3,7);
    graph2->addEdge(2,3);
    graph2->addEdge(3,2);
    graph2->printMap();
    graph2->DFS();
    graph2->transpos();
    graph2->DFS(true);
    delete graph2;
    return 0;
}
